package com.ccz.demo.design.proxy.logdemo.jdk;

import java.lang.reflect.Proxy;

/**
 * @ClassName LogProxyFactory
 * @Author caihaoyun
 * @Date 2020/5/29
 * @Version V1.0
 **/
public class LogProxyFactory {

    public static Object ObjectgetProxy(Object target) {
        LogHandler handler = new LogHandler(target);
        return Proxy.newProxyInstance(target.getClass().getClassLoader(),target.getClass().getInterfaces(), handler);
    }

}
